﻿@using ZDSoft.LMS.Domain;
@model DeliveryForm
@{
    ViewBag.Title = "创建送货单";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; background-color: White;"
    align="center">
    <tr>
        <td class="mbg">
            <table cellspacing="0" cellpadding="0" width="100%" border="0" valign="top">
                <tr>
                    <td>
                        <table style="height: 23px;" cellspacing="0" cellpadding="0" width="120" background="@Url.Content("~/Content/Images/m_17.gif")"
                            border="0">
                            <tr>
                                <td>
                                    <span class="contentPageTitle">&nbsp;&gt;&gt; 创建送货单</span>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="titleContentDivider" height="6">
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<p>
    @Html.ActionLink("返回列表", "Index")
</p>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/Style/CreateTranportOrder.css")" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript">
    function printdiv(printpage) {
        var headstr = "<html><head><title></title></head><body>";
        var footstr = "</body>";
        var newstr = document.all.item(printpage).innerHTML;
        var oldstr = document.body.innerHTML;
        document.body.innerHTML = headstr + newstr + footstr;
        window.print();
        document.body.innerHTML = oldstr;
        return false;
    }
</script>
<div>
    @using (Html.BeginForm())
    {
        @Html.ValidationSummary(true)
        <div id="tf">
            <table class="transportOrderTable" border="0" width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="70">
                        送货人员：
                    </td>
                    <td colspan="2">
                        @Html.HiddenFor(model => model.TransportOrder.ID)
                        @Html.HiddenFor(model => model.TransportOrder.TranportOrderItems[0].ID)
                        @Html.DropDownListFor(model => model.TransporterID, new SelectList(ViewBag.DriverList, "ID", "UserName"), "------请选择-----")
                    </td>
                    <td>
                        运输车辆：
                    </td>
                    <td>
                        @Html.DropDownListFor(model => model.VehicleID, new SelectList(ViewBag.VehicleList, "ID", "VehicleNumber"), "------请选择-----")
                    </td>
                    <td>
                        送货时间：
                    </td>
                    <td colspan="3">
                        @Html.EditorFor(Model => Model.DeliveryDate)
                    </td>
                </tr>
                <tr>
                    <td width="70">
                        发站：
                    </td>
                    <td colspan="2">
                        @Html.DisplayFor(Model => Model.TransportOrder.StartStation)
                    </td>
                    <td>
                        到站：
                    </td>
                    <td colspan="5">
                        @Html.DisplayFor(Model => Model.TransportOrder.Destionation)
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        到站所属省（市）自治区
                    </td>
                    <td colspan="5">
                        @Html.DisplayFor(Model => Model.TransportOrder.ProvinceOfDestionation.Name)
                    </td>
                    <td rowspan="6">
                        <span>运输方式</span>
                    </td>
                    <td rowspan="6" colspan="2">
                        @Html.DisplayFor(Model => Model.TransportOrder.DeliveryType)
                    </td>
                </tr>
                <tr>
                    <td>
                        <span>发货地点</span>
                    </td>
                    <td colspan="3">
                        @Html.DisplayFor(Mode => Model.TransportOrder.StartStationLocation)
                    </td>
                    <td>
                        <span>交货地点</span>
                    </td>
                    <td colspan="2">
                        @Html.DisplayFor(Model => Model.TransportOrder.DeliveryLocation)
                    </td>
                </tr>
                <tr>
                    <td rowspan="2">
                        <span>托运人</span>
                    </td>
                    <td>
                        <span>名称</span>
                    </td>
                    <td colspan="3">
                        @Html.DisplayFor(Model => Model.TransportOrder.Commisionedor.Name)
                    </td>
                    <td>
                        <span>电话</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Commisionedor.Telephone)
                    </td>
                </tr>
                <tr>
                    <td>
                        <span>地址</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Commisionedor.Address)
                    </td>
                    <td>
                        <span>邮编</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Commisionedor.PostNumber)
                    </td>
                    <td>
                        <span>E-mail</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Commisionedor.Email)
                    </td>
                </tr>
                <tr>
                    <td rowspan="2">
                        <span>收货人</span>
                    </td>
                    <td>
                        <span>名称</span>
                    </td>
                    <td colspan="3">
                        @Html.DisplayFor(Model => Model.TransportOrder.Receiver.Name)
                    </td>
                    <td>
                        <span>电话</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Receiver.Telephone)
                    </td>
                </tr>
                <tr>
                    <td>
                        <span>地址</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Receiver.Address)
                    </td>
                    <td>
                        <span>邮编</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Receiver.PostNumber)
                    </td>
                    <td>
                        <span>E-mail</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Receiver.Email)
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        货物品名
                    </td>
                    <td>
                        集装箱箱型
                    </td>
                    <td>
                        集装箱箱类
                    </td>
                    <td>
                        集装箱数量
                    </td>
                    <td>
                        集装箱号码
                    </td>
                    <td>
                        施封号码
                    </td>
                    <td colspan="2">
                        运输费用
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        @Html.DisplayFor(Model => Model.TransportOrder.TranportOrderItems[0].CargoName, new { @class = "cargoTextWidth" })
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.TranportOrderItems[0].CabinetSort, new { @class = "cargoTextWidth" })
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.TranportOrderItems[0].CabinetType, new { @class = "cargoTextWidth" })
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.TranportOrderItems[0].Counter, new { @class = "cargoTextWidth" })
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.TranportOrderItems[0].CabinetNumber, new { @class = "cargoTextWidth" })
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.TranportOrderItems[0].SealedNumber, new { @class = "cargoTextWidth" })
                    </td>
                    <td colspan="2">
                        @Html.DisplayFor(Model => Model.TransportOrder.TranportOrderItems[0].TransportFee, new { @class = "cargoTextWidth" })
                    </td>
                </tr>
                <tr>
                    <td>
                        <span>托运人记载事项</span>
                    </td>
                    <td colspan="2">
                        @Html.DisplayFor(Model => Model.TransportOrder.CommissionedorRemark)
                    </td>
                    <td>
                        <span>添附文件</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.AttachedFile)
                    </td>
                    <td>
                        <span>货物价格</span>
                    </td>
                    <td>
                        @Html.DisplayFor(Model => Model.TransportOrder.Price)
                    </td>
                    <td>
                        承运人记载事项
                    </td>
                    <td colspan="3">
                        @Html.DisplayFor(Model => Model.TransportOrder.TransportorRemark)
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <input type="hidden" name="TranporTypeid" id="TranporTypeid" />
            <input type="submit" value="保存" class="yss4" />
            <input type="submit" value="打印" onclick="printdiv('tf')" class="yss4" />
        </div>
    }
    <div>
        @Html.ValidationMessageFor(Model => Model.TransporterID)
        @Html.ValidationMessageFor(Model => Model.VehicleID)
        @Html.ValidationMessageFor(Model => Model.DeliveryDate)
    </div>
</div>
